PLC Online Change


  • The project must be saved () and compiled () before doing an online change.

This section provides a detailed description of the PLCClosed "Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events Online ChangeClosed Applies to downloading PLC code changes while the applicaiton is running. functionality.

See Using PLC Online Change for more information about using this functionality.

What is Online Change

Online Change enables you to update your PLC application on the fly, while it is running on the controller. You do not need to stop the controller, download the new code and start again. You only need to modify, recompile and download the new code as shown in the figure below; and then ask the controller to switch the execution to the new application.

Online Change - Process Diagram

Figure 6-13: Online Change - Process Diagram


  • Depending on the PLC code size, the time to perform the Online Change operation can take more than one cycle.
    In that case, you can miss one PLC cycle before the changeover becomes effective.
    This duration is also displayed in the Log window with this INFO level message: Online Change done in X µs.

    The INFO measurement corresponds to the duration for the code hotswap.
    The download and loading of new code in memory is not taken into account in this measurement because they occur when the previous code is still running.

This feature is used in these situations:

  • Development Phase
    • Modify the application and apply these modifications incrementally without stopping the controller.
  • Update in production
    • Update the running motion application (e.g., with a bug fix release) without stopping the whole production chain.

When Online Change is enabled, you can perform these kinds of changes on the fly:

These changes are not allowed:


  • When Online Change is enabled and custom libraries are used, some errors can occur during the compilation.
    This happens if you open your project on another PC or under a different user account in Windows.
    To fix this limitation:

    1. Deactivate the Online Change.
    2. Save and then reopen the project.
    3. Re-enable the Online Change.


  • Your new application can contain more variables than the previous one.
    A memory with sufficient pre-allocated space is defined for the eventual new variables.
    If you exceed this limit, a warning message opens.

For limitation about breakpoint with Online Change, see Online Change.

Activate an Online Change

To allow Online Change, you need to open the PLC options and set the relevant parameters.

PLC Options - Online Change Enable

Figure 6-15: PLC Options - Online Change Enable

Set the Parameters

This box allows you to enable or disable the Online Change feature (see call out ).


  • If you deactivate the Online Change, the next PLC application generated is no more compatible for an online change, even if you re-activated the online change before the compilation.
    As a result, you can only apply an Online Change to a running application under these conditions:

    • The Online Change was already activated.
    • You have never deactivated the Online Change between the compilation of the running application and the compilation of the new application.

Verify the Normal code is selected because Online Change is not possible with Optimized code.

When Optimized code is selected, then Online Change is always deactivated.

Then you can compile the application; this now allows future changes on the fly.

Switch to Edit Mode

When you start the application, the Debug mode is automatically activated.

  • You can see the values changing in the editors and the Dictionary (animation), showing what is happening on the controller.
  • In this mode, the editor is read-only, so you are not able to modify the code.

To edit your code, go out of the Debug mode and enter the Edit mode by clicking the () button in the Main Toolbar.

Perform the Online Change

When your new code has compiled correctly, you can perform the Online Change. To do so, click the button. When you click this button, the KAS-IDEClosed "Integrated development environment" An integrated development environment is a type of computer software that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger opens a window showing the execution of current actions (download, activation of new code).

Online Change - Updating Controller Version

Figure 6-16: Online Change - Updating Controller Version

Once the Online Change is applied, the result is displayed in the window and you can click OK to acknowledge the operation and do a

Warm start.

Dictionary Behavior

When the Online Change is enabled, the dictionary shows:

  • new variables in blue
  • deleted variables in red

Online Change - Dictionary

Figure 6-17: Online Change - Dictionary


  • The deleted variables can be used for new variables.

The Revert Button

The Revert button is for security purposes.

  • It's used, after an Online Change, to revert the change quickly and return to the previous application.
    • That means switching the execution of the controller to the P-code that was running before the last Online Change.
    • The source code in the KAS-IDE is not replaced.
    • The WAIT / WAIT_TIME instructions can not be used with Revert.

After the Revert, the KAS-IDE automatically goes back to Edit mode and is disconnected from the controller.

the controller must be manually reconnected.


  • You can go back to the previous version only when the Online Change feature is activated and while the controller is not stopped.


  • After a revert operation, the Online Change feature is deactivated.

One-click Recovery - Process Diagram

Figure 6-18: One-click Recovery - Process Diagram

The Revert button is active when you are connected and the controller is running.

Revert is not possible:

  • If you did not perform an Online Change.
  • If the controller has been restarted since the previous Online Change.
  • After another Revert.
  • During a WAIT.

Difference between Local and Controller Versions

When you restore a project with the Revert feature after an Online Change, KAS provides a tool to show the differences between two versions of the project.

This tool can help:

  • In checking all modifications before the next Online Change.
  • Compare the code with the last version after a Revert.

See Compare PLC Programs for more information.